import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入操作编码：");
        int x= sc.nextInt();
        System.out.println("请输入a");
        int a= sc.nextInt();
        System.out.println("请输入b");
        int b= sc.nextInt();
        int c=a+b;
        int d=a-b;
        int f=a*b;
        int g=a/b;
        int h=a%b;
        switch (x) {
            case (1):
                System.out.println("a+b=" + c);
                break;
            case (2):
                System.out.println("a-b=" + d);
                break;
            case (3):
                System.out.println("a*b=" + f);
                break;
            case (4):
                System.out.println("a/b=" + g);
                break;
            case (5):
                System.out.println("a%b=" + h);
                break;
        }
        System.out.println("请输入退出操作码:");
        String l= sc.next();
        if (l.equals("Q")) {
            System.out.println("退出");
        }
    }
}
